package org.liuyunfeng.web;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * @author: TanJingyu
 * @create: 2023-02-22 19:52
 **/
@RestController
@RequestMapping("/oom")
public class OOMController {
    private final List<Object> objects = new ArrayList<>();

    @GetMapping
    public void oom() {
        while (true) {
            objects.add(new Object());
        }
    }

}

    